﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Security;
using System.Runtime.InteropServices;

namespace System.Peppers.Win32
{
    [SuppressUnmanagedCodeSecurity, ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("e707dcde-d1cd-11d2-bab9-00c04f8eceae")]
    internal interface IAssemblyCache
    {
        [PreserveSig]
        int UninstallAssembly(IASSEMBLYCACHE_INSTALL_FLAG dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszAssemblyName, IntPtr pvReserved, out uint pulDisposition);

        [PreserveSig]
        int QueryAssemblyInfo(IASSEMBLYCACHE_INSTALL_FLAG dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszAssemblyName, IntPtr pAsmInfo);

        [PreserveSig]
        int CreateAssemblyCacheItem(IASSEMBLYCACHE_INSTALL_FLAG dwFlags, IntPtr pvReserved, out IntPtr ppAsmItem, [MarshalAs(UnmanagedType.LPWStr)] string pszAssemblyName);

        [PreserveSig]
        int CreateAssemblyScavenger(out object ppAsmScavenger);

        [PreserveSig]
        int InstallAssembly(IASSEMBLYCACHE_INSTALL_FLAG dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszManifestFilePath, IntPtr pvReserved);
    }
}
